package eventReservationServer;

import java.io.Serializable;

/**
 * The aim of this class is to implement the DTO Pattern So, object from this
 * class will be transferred using RMI, from the server to the client
 * 
 * ATTENTION - ATTENTION - ATTENTION - ATTENTION
 * 
 * SOME DETAILS OF THE CLASS ARE PROVIDED BUT ONE ESSENTIAL DETAIL IS MISSING
 * TIP: PARAMETER PASSING IN RMI.
 */

public class EventRMIDTO implements Serializable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = -519509401240184083L;
	private String eventServer;
	private String name;
	private String date;
	private String description;
	private int availablePlaces;
	private int eventID;

	public EventRMIDTO(String h, String n, String d, String des, int s, int id)
	{
		eventServer = h;
		name = n;
		date = d;
		description = des;
		availablePlaces = s;
		eventID = id;
	}

	public String getEventServer()
	{
		return eventServer;
	}

	public String getName()
	{
		return name;
	}

	public String getDescription()
	{
		return description;
	}

	public String getDate()
	{
		return date;
	}

	public int getAvailablePlaces()
	{
		return availablePlaces;
	}

	public void setAvailablePlaces(int s)
	{
		availablePlaces = s;
	}

	public void decAvailablePlaces(int dec)
	{
		availablePlaces -= dec;
	}

	public int getEventID()
	{
		return eventID;
	}
	
	@Override
	public String toString()
	{
		return "EventServer: " + getEventServer() + "  EventName: " + getName() + "  Description: " + getDescription() + "  Date: " + getDate() + "  Places: " + getAvailablePlaces();
	}
}
